/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.triumphsys.icici.cmeeting.portlet.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.service.ServiceContext;

import com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal;

import java.util.List;

/**
 * The persistence utility for the c m valuation proposal service. This utility wraps {@link CMValuationProposalPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
 * </p>
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Triumphsys
 * @see CMValuationProposalPersistence
 * @see CMValuationProposalPersistenceImpl
 * @generated
 */
public class CMValuationProposalUtil {
	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(CMValuationProposal cmValuationProposal) {
		getPersistence().clearCache(cmValuationProposal);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<CMValuationProposal> findWithDynamicQuery(
		DynamicQuery dynamicQuery) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<CMValuationProposal> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<CMValuationProposal> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
	 */
	public static CMValuationProposal remove(
		CMValuationProposal cmValuationProposal) throws SystemException {
		return getPersistence().remove(cmValuationProposal);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static CMValuationProposal update(
		CMValuationProposal cmValuationProposal, boolean merge)
		throws SystemException {
		return getPersistence().update(cmValuationProposal, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static CMValuationProposal update(
		CMValuationProposal cmValuationProposal, boolean merge,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence()
				   .update(cmValuationProposal, merge, serviceContext);
	}

	/**
	* Caches the c m valuation proposal in the entity cache if it is enabled.
	*
	* @param cmValuationProposal the c m valuation proposal to cache
	*/
	public static void cacheResult(
		com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal cmValuationProposal) {
		getPersistence().cacheResult(cmValuationProposal);
	}

	/**
	* Caches the c m valuation proposals in the entity cache if it is enabled.
	*
	* @param cmValuationProposals the c m valuation proposals to cache
	*/
	public static void cacheResult(
		java.util.List<com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal> cmValuationProposals) {
		getPersistence().cacheResult(cmValuationProposals);
	}

	/**
	* Creates a new c m valuation proposal with the primary key. Does not add the c m valuation proposal to the database.
	*
	* @param valuationProposalId the primary key for the new c m valuation proposal
	* @return the new c m valuation proposal
	*/
	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal create(
		long valuationProposalId) {
		return getPersistence().create(valuationProposalId);
	}

	/**
	* Removes the c m valuation proposal with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param valuationProposalId the primary key of the c m valuation proposal to remove
	* @return the c m valuation proposal that was removed
	* @throws com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException if a c m valuation proposal with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal remove(
		long valuationProposalId)
		throws com.liferay.portal.kernel.exception.SystemException,
			com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException {
		return getPersistence().remove(valuationProposalId);
	}

	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal updateImpl(
		com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal cmValuationProposal,
		boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(cmValuationProposal, merge);
	}

	/**
	* Finds the c m valuation proposal with the primary key or throws a {@link com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException} if it could not be found.
	*
	* @param valuationProposalId the primary key of the c m valuation proposal to find
	* @return the c m valuation proposal
	* @throws com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException if a c m valuation proposal with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal findByPrimaryKey(
		long valuationProposalId)
		throws com.liferay.portal.kernel.exception.SystemException,
			com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException {
		return getPersistence().findByPrimaryKey(valuationProposalId);
	}

	/**
	* Finds the c m valuation proposal with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param valuationProposalId the primary key of the c m valuation proposal to find
	* @return the c m valuation proposal, or <code>null</code> if a c m valuation proposal with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal fetchByPrimaryKey(
		long valuationProposalId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(valuationProposalId);
	}

	/**
	* Finds all the c m valuation proposals where proposalId = &#63;.
	*
	* @param proposalId the proposal id to search with
	* @return the matching c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal> findByproposalId(
		long proposalId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByproposalId(proposalId);
	}

	/**
	* Finds a range of all the c m valuation proposals where proposalId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param proposalId the proposal id to search with
	* @param start the lower bound of the range of c m valuation proposals to return
	* @param end the upper bound of the range of c m valuation proposals to return (not inclusive)
	* @return the range of matching c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal> findByproposalId(
		long proposalId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByproposalId(proposalId, start, end);
	}

	/**
	* Finds an ordered range of all the c m valuation proposals where proposalId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param proposalId the proposal id to search with
	* @param start the lower bound of the range of c m valuation proposals to return
	* @param end the upper bound of the range of c m valuation proposals to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal> findByproposalId(
		long proposalId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByproposalId(proposalId, start, end, orderByComparator);
	}

	/**
	* Finds the first c m valuation proposal in the ordered set where proposalId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param proposalId the proposal id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the first matching c m valuation proposal
	* @throws com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException if a matching c m valuation proposal could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal findByproposalId_First(
		long proposalId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException {
		return getPersistence()
				   .findByproposalId_First(proposalId, orderByComparator);
	}

	/**
	* Finds the last c m valuation proposal in the ordered set where proposalId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param proposalId the proposal id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the last matching c m valuation proposal
	* @throws com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException if a matching c m valuation proposal could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal findByproposalId_Last(
		long proposalId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException {
		return getPersistence()
				   .findByproposalId_Last(proposalId, orderByComparator);
	}

	/**
	* Finds the c m valuation proposals before and after the current c m valuation proposal in the ordered set where proposalId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param valuationProposalId the primary key of the current c m valuation proposal
	* @param proposalId the proposal id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the previous, current, and next c m valuation proposal
	* @throws com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException if a c m valuation proposal with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal[] findByproposalId_PrevAndNext(
		long valuationProposalId, long proposalId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			com.triumphsys.icici.cmeeting.portlet.NoSuchCMValuationProposalException {
		return getPersistence()
				   .findByproposalId_PrevAndNext(valuationProposalId,
			proposalId, orderByComparator);
	}

	/**
	* Finds all the c m valuation proposals.
	*
	* @return the c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Finds a range of all the c m valuation proposals.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of c m valuation proposals to return
	* @param end the upper bound of the range of c m valuation proposals to return (not inclusive)
	* @return the range of c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Finds an ordered range of all the c m valuation proposals.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of c m valuation proposals to return
	* @param end the upper bound of the range of c m valuation proposals to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.triumphsys.icici.cmeeting.portlet.model.CMValuationProposal> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the c m valuation proposals where proposalId = &#63; from the database.
	*
	* @param proposalId the proposal id to search with
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByproposalId(long proposalId)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByproposalId(proposalId);
	}

	/**
	* Removes all the c m valuation proposals from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Counts all the c m valuation proposals where proposalId = &#63;.
	*
	* @param proposalId the proposal id to search with
	* @return the number of matching c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static int countByproposalId(long proposalId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByproposalId(proposalId);
	}

	/**
	* Counts all the c m valuation proposals.
	*
	* @return the number of c m valuation proposals
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static CMValuationProposalPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (CMValuationProposalPersistence)PortletBeanLocatorUtil.locate(com.triumphsys.icici.cmeeting.portlet.service.ClpSerializer.SERVLET_CONTEXT_NAME,
					CMValuationProposalPersistence.class.getName());
		}

		return _persistence;
	}

	public void setPersistence(CMValuationProposalPersistence persistence) {
		_persistence = persistence;
	}

	private static CMValuationProposalPersistence _persistence;
}